#include "compiler.h"
#include <avr/io.h>
#include <avr/interrupt.h>

#ifndef __CONFIG_H__
#define __CONFIG_H__

#if defined(__AVR_ATmega1284P__)
	//#define SPCR	SPCR
#elif defined(__AVR_ATmega644P__)
	#define SPCR	SPCR0
	#define SPE		SPE0
	#define MSTR	MSTR0
	#define SPR1	SPR01 
	#define SPR0	SPR00
	#define CPHA	CPHA0
	#define CPOL	CPOL0

	#define SPSR	SPSR0
	#define SPIF	SPIF0
	#define SPI2X	SPI2X0

	#define SPDR	SPDR0
#endif

#define USE_UART		UART_0
#define UART_BAUDRATE	38400

#define Sram_rd_byte(addr_byte)     ( *(U8*)(addr_byte) )

//_____ D E F I N I T I O N S ______________________________________________

    // -------------- MCU LIB CONFIGURATION
#define FOSC           20000L        // 20 MHz External cristal
#define F_CPU          (FOSC*1000L)  // Need for AVR GCC

#endif // __CONFIG_H__
